﻿/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	// config.language = 'zh_CN';
	// config.uiColor = '#AADC6E';
	config.skin = 'v2';	
	config.autoParagraph = false;
	config.htmlEncodeOutput=true; 
	config.ignoreEmptyParagraph = false;
	config.toolbar='Hangar';	
	
	config.toolbar_Hangar =
		[
			{ name: 'document', items : [ 'Source','-','DocProps','Preview','Print','-','Templates' ] },
			{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
			{ name: 'editing', items : [ 'Find','Replace','-','SelectAll'] },
			{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 
		        'HiddenField' ] },
			'/',
			{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
			{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
			'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
			{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
			{ name: 'insert', items : [ 'Image','Flash','flvPlayer','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
			'/',
			{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
			{ name: 'colors', items : [ 'TextColor','BGColor' ] },
			{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ,'-','CmsTag'] }
		];
	
	config.toolbar_Simple =
		[
			{ name: 'document', items : [ 'Source'] },
			{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
			{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','-','RemoveFormat' ] },
			{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent',
			'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] },
			{ name: 'links', items : [ 'Link','Unlink' ] },
			{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule' ] },
			'/',
			{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
			{ name: 'colors', items : [ 'TextColor','BGColor' ] },
			{ name: 'tools', items : [ 'Maximize'] }
		];
	
	
	
	config.extraPlugins = 'flvPlayer'; 
	
	config.font_names='宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体_GB2312;隶书/隶书;幼圆/幼圆;微软雅黑/微软雅黑;'+ config.font_names;
	//config.protectedSource.push(/(\[(@cms_[^\s;]+)[^\]]*\][\s|\S]*?\[\/\2\])|(\[(#[^\s;]+)[^\]]*\][\s|\S]*?\[\/\4\])|(\[@cms_[^\]]+\/\])|(\[#include[^\]]+\])|(\[#assign[^\]]+\])|(\[#import[^\]]+\])|(\[#global[^\]]+\])|(\[#local[^\]]+\])|(\[#setting[^\]]+\])/gi);
	config.protectedSource.push(/(\[@cms_[^\]]*\](\[@cms_[^\]]*\](\[@cms_[^\]]*\](\[@cms_[^\]]*\][\s|\S]*?\[\/@cms_[^\]]*\]|[\s|\S])*?\[\/@cms_[^\]]*\]|[\s|\S])*?\[\/@cms_[^\]]*\]|[\s|\S])*?\[\/@cms_[^\]]*\])|(\[@cms_[^\]]+\/\])|(\[#include[^\]]+\])|(\[#assign[^\]]+\])|(\[#import[^\]]+\])|(\[#global[^\]]+\])|(\[#local[^\]]+\])|(\[#setting[^\]]+\])/gi);
	//config.protectedSource.push( /(\[@cms_[^\]]+\][\s|\S]*?\[\/@cms_[^\]]+\])|(\[@cms_[^\]]+\/\])/g );
};
